Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stimmy

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stimmy

Replace your string variables by your values easily.

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

stimmy

Dependencies Dependencies Code Climate score Codecov Code Climate issue Node.js version NPM version Build Status Security version MIT License PRs Welcome

Description

This module provides a string variables replacer.

Install

$ npm install stimmy --save

Features

  • Can replace variables from an object.
  • Can replace variables from an array.

Documentation

Examples

From import

import stimmy from 'stimmy';

From require

const stimmy = require('stimmy');

From an array

  const str = stimmy('This {0} is {1}!', ['module', 'awesome']);
  // This module is awesome!
  const str = stimmy('{0}% of code coverage, it\'s {1}...', [100, 'so amazing']);
  // 100% of code coverage, it's so amazing...

From an object

  const str = stimmy('{timmy} My hobby is {hobby}...', {timmy: 'Timmmmmmmyy !!', hobby: 'running'});
  // Timmmmmmmyy !! My hobby is running...
  const str = stimmy('My name is {name}, I\'m {age}.', {name: 'stimmy', age: 25});
  // My name is stimmy, I'm 25.

Scripts

Run using npm run

clean - remove coverage data, Jest cache and transpiled files,
lint - lint source files and tests,
typecheck - check type annotations,
test - lint, typecheck and run tests with coverage,
test-only - run tests with coverage,
test:watch - interactive watch mode to automatically re-run tests,
build - compile source files,
build:watch - interactive watch mode, compile sources on change.

License

MIT © Dimitri DO BAIRRO

Keywords

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc